<?xml version="1.0"?>
<Schema name="FDTModbusConfigSchema" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">

<!--  Configuration schema for Modbus Comm DTM communication parameters V0.1-->

	<!-- Version of the configuration file -->
	<AttributeType name="configFileVersion" dt:type="string"/>
    <!-- Key to enable/disable advanced logging with information -->
    <!-- exchanged on the FDT interfaces -->
    <AttributeType name="enableAdvancedLogging" dt:type="boolean" default="0"/>
    
    <!-- Product specific information, which will be used in order to select -->
    <!-- product specific configurations -->    
    
	<!-- Name of the product department -->
	<AttributeType name="productDep" dt:type="string"/>
	<!-- Name of the product -->
	<AttributeType name="product" dt:type="string"/>    
	<!-- Version of the product -->
	<AttributeType name="productVersion" dt:type="string"/>      
    
    
	<!-- Modbus Serial Line communication parameters --> 
    
	<!-- Parameter: Baud rate -->
	<AttributeType name="baudrate" dt:type="enumeration" dt:values="110 300 600 1200 2400 4800 9600 14400 19200 38400 56000 57600 115200 128000 256000"/>
	<!-- Parameter: Parity -->
    <AttributeType name="parity" dt:type="enumeration" dt:values="even odd none"/>
    <!-- Parameter: Stopbits -->
    <AttributeType name="stopbits" dt:type="enumeration" dt:values="1 2"/>
   
    
    
    <!-- Set of communication parameters -->    
    <ElementType name="CommParameters" content="mixed" model="closed">
        <attribute type="baudrate" required="yes"/>
        <attribute type="parity" required="yes"/>
        <attribute type="stopbits" required="yes"/>
	</ElementType>
    
    <!-- Baud rate available for selection in the MB Comm DTM -->    
    <ElementType name="SupportedBaudrate" content="mixed" model="closed">
        <attribute type="baudrate" required="yes"/>
	</ElementType>
    
    <!-- Communication parameters which shall be used as default configuration -->    
    <ElementType name="DefaultConfig" content="mixed" model="closed">
        <element type="CommParameters" minOccurs="1" maxOccurs="1"/>      
	</ElementType>

    <!-- Any configuration -->   
    <ElementType name="Config" content="eltOnly" model="closed">
        <element type="CommParameters" minOccurs="1" maxOccurs="1"/> 
	</ElementType>
   
    <!-- Collection of supported baudrates for manual configuration -->   
    <ElementType name="SupportedBaudrates" content="mixed" model="closed">
        <element type="SupportedBaudrate" minOccurs="1" maxOccurs="*"/> 
	</ElementType>
  
    <!-- Collection of standard configurations which will be used -->     
    <!-- if no product specific configuration is available-->    
    <ElementType name="DefaultConfigs" content="eltOnly" model="closed">
        <element type="SupportedBaudrates" minOccurs="1" maxOccurs="1"/>    
        <element type="DefaultConfig" minOccurs="1" maxOccurs="1"/>
        <element type="Config" minOccurs="0" maxOccurs="*"/>
	</ElementType>
    
    
    <!-- Collection of product specific configurations -->     
    <ElementType name="ProductSpecConfigs" content="mixed" model="closed">
        <attribute type="productDep" required="yes"/>
        <attribute type="product" required="yes"/>
        <attribute type="productVersion" required="yes"/>    
        <element type="SupportedBaudrates" minOccurs="1" maxOccurs="1"/>
        <element type="DefaultConfig" minOccurs="1" maxOccurs="1"/>
        <element type="Config" minOccurs="0" maxOccurs="*"/>
	</ElementType>    
 
 
     <!-- Root element-->    
    <ElementType name="Configurations" content="mixed" model="closed">
		<attribute type="configFileVersion" required="yes"/>
        <attribute type="enableAdvancedLogging" required="no"/>
        <element type="DefaultConfigs" minOccurs="1" maxOccurs="1"/>
        <element type="ProductSpecConfigs" minOccurs="0" maxOccurs="*"/>
	</ElementType>
    
   


</Schema>
